package com.crm.model.pojo;

import java.io.Serializable;
import javax.persistence.*;
import java.util.List;


/**
 * The persistent class for the productcategory database table.
 * 
 */
@Entity
@Table(name="productcategory")
@NamedQuery(name="Productcategory.findAll", query="SELECT p FROM Productcategory p")
public class Productcategory implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	private String cateid;

	private String catedescribe;

	private String catename;

	private String levles;

	//bi-directional many-to-one association to Productcategory
	@ManyToOne
	@JoinColumn(name="pid")
	private Productcategory productcategory;

	//bi-directional many-to-one association to Productcategory
	@OneToMany(mappedBy="productcategory")
	private List<Productcategory> productcategories;

	public Productcategory() {
	}

	public String getCateid() {
		return this.cateid;
	}

	public void setCateid(String cateid) {
		this.cateid = cateid;
	}

	public String getCatedescribe() {
		return this.catedescribe;
	}

	public void setCatedescribe(String catedescribe) {
		this.catedescribe = catedescribe;
	}

	public String getCatename() {
		return this.catename;
	}

	public void setCatename(String catename) {
		this.catename = catename;
	}

	public String getLevles() {
		return this.levles;
	}

	public void setLevles(String levles) {
		this.levles = levles;
	}

	public Productcategory getProductcategory() {
		return this.productcategory;
	}

	public void setProductcategory(Productcategory productcategory) {
		this.productcategory = productcategory;
	}

	public List<Productcategory> getProductcategories() {
		return this.productcategories;
	}

	public void setProductcategories(List<Productcategory> productcategories) {
		this.productcategories = productcategories;
	}

	public Productcategory addProductcategory(Productcategory productcategory) {
		getProductcategories().add(productcategory);
		productcategory.setProductcategory(this);

		return productcategory;
	}

	public Productcategory removeProductcategory(Productcategory productcategory) {
		getProductcategories().remove(productcategory);
		productcategory.setProductcategory(null);

		return productcategory;
	}

}